Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applications: nrf_desktop: generic max report size handling #19691

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pdunaj
Copy link
Contributor

@pdunaj pdunaj commented Dec 20, 2024

Handle max input and output report size in scalable way.

@pdunaj pdunaj requested a review from MarekPieta December 20, 2024 13:43
@pdunaj pdunaj requested a review from a team as a code owner December 20, 2024 13:43
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 20, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Dec 20, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 3

Inputs:

Sources:

sdk-nrf: PR head: 32a2ebb7c7f9b1040a5af9c4b49035317a7aada4

more details

sdk-nrf:

PR head: 32a2ebb7c7f9b1040a5af9c4b49035317a7aada4
merge base: 1133ff3eb088ec3b3082b2e52a392aa85c577707
target head (main): bb55a3b33c01869a60aa078a8d145f0a16228e58
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (1)
applications
│  ├── nrf_desktop
│  │  ├── configuration
│  │  │  ├── common
│  │  │  │  │ hid_report_desc.h

Outputs:

Toolchain

Version: b77d8c1312
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:b77d8c1312_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 95
  • ✅ Integration tests
    • ✅ desktop52_verification
Disabled integration tests
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publish GitHub Action.

#define _REPORT_BUFFER_SIZE_KEYBOARD_LEDS \
(IS_ENABLED(CONFIG_DESKTOP_HID_REPORT_KEYBOARD_SUPPORT) ? (REPORT_SIZE_KEYBOARD_LEDS) : (0))
union _input_report_size_max {
#if CONFIG_DESKTOP_HID_REPORT_MOUSE_SUPPORT || CONFIG_DESKTOP_HID_REPORT_BOOT_INTERFACE_MOUSE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we only use CONFIG_DESKTOP_HID_REPORT_MOUSE_SUPPORT here? (boot mouse report is handled as a separate case)
Similar for keyboard input report.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the hid_state is using the same report data for both boot and normal variants. This is why I used this setup - it makes sure that code always works.

Copy link
Contributor

@MarekPieta MarekPieta Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation limitation is already handled by Kconfig dependency: https://github.com/nrfconnect/sdk-nrf/blob/main/applications/nrf_desktop/Kconfig.hid#L169-L175. I think we could simplify here then.

Handle max input and output report size in scalable way.

Signed-off-by: Pawel Dunaj <[email protected]>
@pdunaj
Copy link
Contributor Author

pdunaj commented Jan 8, 2025

rebased

@pdunaj pdunaj requested a review from MarekPieta January 9, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants